using System;

namespace QuickTest.Core.Compilation
{
    public class FileUri
    {
        private readonly Uri uri;

        public FileUri(string uriString)
            : this(new Uri(uriString))
        {
        }

        private FileUri(Uri uri)
        {
            if (uri == null)
                throw new ArgumentNullException("uri");

            if (! uri.IsFile)
                throw new ArgumentException("Uri must be a file uri");

            this.uri = uri;
        }

        public string AbsolutePath
        {
            get { return uri.AbsolutePath; }
        }
    }
}